﻿using BCData.TMS.PlatformManageFee.PlatformManageFeeExecutionPlan;
using BCDto.TMS.PlatformManageFee.PlatformManageFeeExecutionPlan;
using BCService.Utils;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BCService.TMS.PlatformManageFee.PlatformManageFeeExecutionPlan
{
    public class PlatformManageFeeExecutionPlanService : IPlatformManageFeeExecutionPlanService
    {
        private readonly IPlatformManageFeeExecutionPlanData platformManageFeeExecutionPlanData;

        public PlatformManageFeeExecutionPlanService(IPlatformManageFeeExecutionPlanData platformManageFeeExecutionPlanData)
        {
            this.platformManageFeeExecutionPlanData = platformManageFeeExecutionPlanData;
        }

        public IEnumerable<PlatformManageFeeExecutionPlanDto> GetNotDoneList()
        {
            return this.platformManageFeeExecutionPlanData.GetNotDoneList().Result.As<IEnumerable<PlatformManageFeeExecutionPlanDto>>();
        }

        public void UpdateIsDone(long platformManageFeeExecutionPlanId)
        {
            this.platformManageFeeExecutionPlanData.UpdateIsDone(platformManageFeeExecutionPlanId).GetAwaiter().GetResult();
        }
    }
}
